import Relay from "react-relay";

export default class AdditionalMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { additional }`;
    }

    getVariables() {
        return {
            argsInput: {
                agree: this.props.agree,
                orderId: this.props.orderId,
                uid: this.props.uid,
                supplyId: this.props.supplyId,
                orderId: this.props.orderId, 
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on additionalPayload {
            additional {
                errorCode
                value
                totalResult
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
              fragment on additionalPayload {
                    additional {
                        errorCode
                        value
                        totalResult
                    }
              }
            `]
        }];
    }

}
